home *** CD-ROM | disk | FTP | other *** search
- #!/bin/bash
- CLAMAV=/cygdrive/c/clamav-devel
- WINPATH=C:/clamav-devel
- MNTPATH=/mnt/clamav
- DOCFILES="NEWS README TODO BUGS AUTHORS ChangeLog FAQ INSTALL"
- DOCDIR="docs examples contrib test"
- DLLFILES="/bin/cygwin1.dll /bin/cygz.dll /bin/cyggmp-3.dll /bin/cygbz2-1.dll /bin/cygiconv-2.dll /bin/cygintl-2.dll /bin/cygminires.dll"
- CYGWINEXE="/bin/tar.exe /bin/mount.exe /bin/umount.exe /bin/unzip.exe"
- CWD=`pwd`
- echo "Installing ClamAV..."
- make install
- echo "Copying over the necessary DLL files that make ClamAV Work..."
- cp -f -v --remove-destination $DLLFILES $CYGWINEXE $CLAMAV/bin/
- #cp -f -v --remove-destination /bin/cygwin1-1.5.16.dll $CLAMAV/bin/cygwin1.dll
- #cp -v --remove-destination libclamav/.libs/cygclamav-1.dll-def libclamav/.libs/cygclamav-1.dll-exp $CLAMAV/lib
- echo "Converting text files to standard Windows linefeeds..."
- mount -t $WINPATH $MNTPATH
- #cd ..
- for i in $DOCFILES; do
- echo "Converting $i..."
- rm -f $MNTPATH/$i
- awk 1 $i > $MNTPATH/$i
- done
- umount $MNTPATH
- echo "Copying over documentation, example, and contrib directories..."
- cp -f --remove-destination -R $DOCDIR $CLAMAV
- #cd $CWD
- cp --remove-destination -R idletimeout.patch clamav-dll.patch configure-clamav-win32 clamav-install $CLAMAV/sosdg/
- find $CLAMAV -name CVS | xargs rm -frv
- find $CLAMAV -name ".cvsignore" | xargs rm -frv
- find $CLAMAV -name ".\#*" | xargs rm -frv
- chown -R Administrators:Users $CLAMAV
- echo "Stripping the applications of debugging symbols..."
- strip --strip-debug $CLAMAV/bin/{cygz.dll,cyggmp-3.dll,cygbz2-1.dll,cygiconv-2.dll,cygintl-2.dll,cygminires.dll}
- strip $CLAMAV/bin/*.exe
- cd $CLAMAV/bin
- # Dont rebase cygwin1.dll
- #ls | grep -v "cygwin1.dll" > files
- #rebaseall -T files
- #rm -f files
- #rebase -b 0x70000000 -v cygwin1.dll
- cd $CWD
- rm -f $CLAMAV/docs/clam.eps
- echo "Done!"
-